$(function () {
    (function ($) {
        /*
         * 表单框水平垂直居中控制
         */
        var loginHeight = ".login .content";
        function heightAuto(obj,height){
            $(obj).animate({
                marginTop:-height
            },400);
        }
        heightAuto(loginHeight,$(loginHeight).outerHeight(true)/2);

        $("#register-btn,#back-btn,#forget-password,#register-back-btn,#register-submit-btn").on("click",function () {
            heightAuto(loginHeight,$(loginHeight).outerHeight()/2);
        });

        $("#register-submit-btn").on("click",function () {
            heightAuto(loginHeight,450);
        });
    })(jQuery);

    (function($){

        var DEFAULT_VERSION = "8.0";
        var ua = navigator.userAgent.toLowerCase();
        var isIE = ua.indexOf("msie")>-1;
        var safariVersion;
        if(isIE){
            safariVersion =  ua.match(/msie ([\d.]+)/)[1];
            if(safariVersion <= DEFAULT_VERSION ){
                window.location.href = "error.html"
            }else{
            }
        }
    })(jQuery)

});